home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 12593 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.6 KB  |  75 lines

  1. Newsgroups: comp.lang.c++,comp.lang.java
  2. Path: uu4news.netcom.com!amc-gw!curtis
  3. From: curtis@amc.com (Curtis Green)
  4. Subject: Re: Java: What's the Big Deal?
  5. Message-ID: <1996Mar20.154600.12011@amc.com>
  6. Organization: Applied Microsystems Corporation
  7. X-Newsreader: TIN [version 1.1 PL6]
  8. References: <milodDoF9JF.K32@netcom.com>
  9. Date: Wed, 20 Mar 1996 15:46:00 GMT
  10.  
  11. John DiCamillo (milod@netcom.com) wrote:
  12. : pete@borland.com (Pete Becker) writes:
  13. : >There's no reason you can't write a C++ compiler that generates a Java 
  14. : >bytestream.
  15. : Are you claiming that arbitrary, correct (ANSI) C++ code can
  16. : be compiled to the JVM and continue to work correctly?  Or are
  17. : you claiming that a compiler can be written that will translate
  18. : some limited subset of C++ into JVM?
  19.  
  20. you would just need a proper backend to do the translation into a JAVA virtual
  21. machine compatible bytestream
  22. : And even if it is the former, given the limitations of the JVM,
  23. : I suspect that the performance characteristics of the resulting
  24. : program might be unrecognizable to the author.
  25. : >>2) No header files => faster compilation
  26. : >Nonsense. Header files are simply text that gets included where you want it. If 
  27. : >you write the same code without header files it will not magically compile 
  28. : >faster.
  29. : It's not nonsense.  Cascaded #includes result in such a
  30. : drastic inflation of the source text that it makes a measurable
  31. : increase in compilation time.
  32. If you surround your header file with #ifndef .. #endif you should be able
  33. to eliminate your cascaded #include problem
  34. foo.h
  35. #ifndef FOO_H
  36. #define FOO_H
  37. ...
  38. #endif
  39.  
  40. : >>3) Slightly simpler syntax (mostly due to the lack of
  41. : >>   address operators, function pointers, and templates)
  42. : >Yup. The question, of course, is what this does to the expressive power of the 
  43. : >language.
  44. : That's strange, I thought the question was "what can you do
  45. : in Java that you can't do in C++", not the other way around.
  46. : And, as I said, points 1 through 4 are practical advantages,
  47. : not critical differences.
  48. : In any case, no one can answer your question until you define
  49. : what you mean by "expressive power".
  50.  
  51. overloaded operators, pointers, function pointers, templates ...
  52. in fact, I miss overloaded operators and overloaded functions in Delphi.  
  53. Though I can get along without them, I feel my hands are tied.
  54. :
  55.  
  56. --
  57. Be seeing you...
  58.  
  59. Curtis Green    |    Software Engineer
  60. curtis@amc.com    |    Applied Microsystems Embedded Systems
  61.                 |    http://www.amc.com
  62. My opinions are |
  63. expressly mine  |    This year Khan escapes Earth on the Botany Bay.
  64. on my own.      |    (Cliff Clavin, 1996)
  65.